home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Panorama / Panorama - Disk 28C (1988-04-27)(Pacific North-West Amigas Club)[WB].zip / Panorama - Disk 28C (1988-04-27)(Pacific North-West Amigas Club)[WB].adf / makema / mazes.doc < prev    next >
Text File  |  1988-02-13  |  2KB  |  35 lines

  1.       Muzz's Maze Makers
  2.  
  3. The 2 executables Maze1 and Maze2 are slight variations of a
  4. Modula-2 program which generates mazes. They were written to try out
  5. a demo copy of M2Amiga (by AMSoft) so some short cuts were needed to
  6. keep the code size under the demo limit.
  7.  
  8. The basic algorithm is to grow a tree from a random point until all
  9. squares in the maze area are connected.  The maze is completed by
  10. choosing 2 "leaf" squares as entry/exits.  This ensures that there
  11. is only one path through the maze.
  12.  
  13. All user communication is thru the IDCMP (Intuition Direct Communication
  14. Message Port) and Pot gadget. The only Intuition messages that the
  15. program responds to are "close-screen" and "screen-has-been-resized".
  16.  
  17. The Pot gadget is read when the screen is resized.
  18.  
  19. Because I don't open a console device it is a little hard to clear 
  20. screen or at least I haven't read enough to find a way yet. Fortunately
  21. screen resizing clears the screen since I am using simple refresh.
  22.  
  23. Maze1 is the fastest. Maze2 allows the same sized maze to be repeatedly
  24. drawn by clicking on the size gadget but not resizing the screen. If
  25. you do that with Maze1 you will get a confused mess.
  26.  
  27. Feel free to use this software in any way you see fit. 
  28. I learnt a lot about Modula-2 and the Amiga by writing it. 
  29.  
  30. By the way the M2Amiga compiler seems to be very good. I have looked
  31. at the generated code and was pleased to see how compact it was.
  32.  
  33.                         Murray Mann (Muzz)       
  34.                         [72460,44]
  35.